<template>
    <button :class="['my-btn', type]"><slot></slot></button>
</template>

<script>
export default {
    name: 'MyButton',
    props: {
        type: String
    }
}
</script>

<style lang="scss">
    .my-btn{
        height: 34px;
        padding: 0 15px;
        border: 1px solid #ddd;
        background-color: #fff;

        &.primary{
            background-color: blue;
            border: 1px solid #ddd;
            color: #fff;
        }

         &.success{
            background-color: green;
            border: 1px solid #ddd;
            color: #fff;
        }

          &.danger{
            background-color: red;
            border: 1px solid #ddd;
            color: #fff;
        }

         &.waring{
            background-color: orange;
            border: 1px solid #ddd;
            color: #fff;
        }
    }
</style>